package com.rainyun.rd.common;

import com.rainyun.rc.config.NodeConfig;
import com.rainyun.rc.config.RainConfig;
import com.rainyun.rc.ioc.BeanAnno;
import com.rainyun.rc.ioc.BeanKey;
import com.rainyun.rc.ioc.BeanType;
import com.rainyun.rc.orm.RainDB;
import com.rainyun.rcmc.own.config.RcConfig;
import com.rainyun.rd.util.RdNmsUtil;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.Map;
import java.util.logging.Logger;

@BeanAnno
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.FIELD})
public @interface BeanRd {
	@BeanKey
	public BeansRd value();

	/**全局变量枚举*/
	public enum BeansRd {
		/**指令集*/
		@BeanType(Map.class)
		Cmds,
		/**日志*/
		@BeanType(Logger.class)
		Logger,
		/**对象配置管理器*/
		@BeanType(RainConfig.class)
		ObjConf,
		/**节点配置管理器*/
		@BeanType(NodeConfig.class)
		NodeConf,

		/**核心配置*/
		@BeanType(RcConfig.class)
		Config,
		/**本插件类加载器*/
		@BeanType(ClassLoader.class)
		Classloader,

		/**数据库管理器*/
		@BeanType(RainDB.class)
		DBMan,

		/**nms工具*/
		@BeanType(RdNmsUtil.class)
		NmsUitl,
	}
}
